#pragma once

#include "Input.h"

// only handle keys, not gamepads
// TODO handle gamepad
class InputController
{
protected:
	typedef map<string, byte> Keys;
	Keys keys;

public:
	InputController(void);
	~InputController(void);

	void SetKey(const string& _name, const byte _key);
	byte GetKey(const string& _name);

	bool IsKeyDown(const string& _name) { return g_InputInstance->IsKeyDown(keys[_name]); }
	bool IsKeyPressed(const string& _name) { return g_InputInstance->IsKeyPressed(keys[_name]); }
	bool IsKeyUp(const string& _name) { return g_InputInstance->IsKeyUp(keys[_name]); }
};
